#include "RendBase.h"
#include "myHead.h"


void RendBase::render()
{


	/*
		glClear(GL_COLOR_BUFFER_BIT);
		glBegin(GL_POINTS);
		glVertex2f(100.0f, 50.0f);
		glVertex2f(100.0f, 130.0f);
		glVertex2f(150.0f, 130.0f);
		glEnd();

		//glutSwapBuffers();
		glFlush();
	*/
}
bool RendBase::initGL()
{
	//Initialize Projection Matrix
	glMatrixMode(GL_PROJECTION);
	glLoadIdentity();

	//Initialize Modelview Matrix
	//glMatrixMode(GL_MODELVIEW);
	//glLoadIdentity();

	gluOrtho2D(0.0, 640.0, 0.0, 480.0);
	glPointSize(4.0);

	//Initialize clear color
	//glClearColor(0.f, 0.f, 0.f, 1.f);
	glClearColor(1.f, 1.f, 1.f, 0.f);
	glColor3f(0.0, 0.0, 0.0);
	//Check for error
	GLenum error = glGetError();
	if (error != GL_NO_ERROR)
	{
		printf("Error initializing OpenGL! %s\n", gluErrorString(error));
		return false;
	}

	return true;
}
// void RendBase::updateLogic()
// {
// 
// }
